package com.jt.factory;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.cglib.proxy.Factory;
import org.springframework.stereotype.Component;

import java.util.Calendar;
@Component

public class CalenderFactory implements FactoryBean<Calendar> {

    @Override
    public Calendar getObject() throws Exception {
       //利用calendar的工具API ,实现对象创建
        return Calendar.getInstance();
    }

    @Override
    public Class<?> getObjectType() {
       //固定写法
        return Calendar.class;
    }
}
